/* Copyright 203-2115 AtomWare Technology Pty Limited
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * 
 * The flowing information must be keep 
 * SearchResult.java
 * identity
 * 2014年4月1日上午10:36:26
 * @author 屈甲康
 * QQ285799123
 * mailto:qujiakang@gmail.com
 */

package org.jackysoft.entity.nosql;

public class SearchResult {
	private String id;
	private String name;
	private String summary;
	private String url;
	private long dateTime;
	private String image;
	private String category;
	private boolean local;

	public String getId() {
		return id;
	}

	public String getName() {
		return name;
	}

	public String getSummary() {
		return summary;
	}

	public String getUrl() {
		return url;
	}

	public long getDateTime() {
		return dateTime;
	}

	public String getImage() {
		return image;
	}

	public void setId(String id) {
		this.id = id;
	}

	public void setName(String name) {
		this.name = name;
	}

	public void setSummary(String summary) {
		this.summary = summary;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public void setDateTime(long dateTime) {
		this.dateTime = dateTime;
	}

	public void setImage(String image) {
		this.image = image;
	}

	@Override
	public int hashCode() {
		if(name==null)return 0;
		return name.hashCode();
	}

	@Override
	public boolean equals(Object obj) {
		SearchResult other = (SearchResult) obj;
		if(other.name==null)return name==null; 
		return other.name.equals(name);
	}

	public String getCategory() {
		return category;
	}

	public void setCategory(String category) {
		this.category = category;
	}

	public boolean isLocal() {
		return local;
	}

	public void setLocal(boolean local) {
		this.local = local;
	}
	
}
